<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<script>
   var s = "abcdefghijk";
  var r = s.search(/k/i);            // 查找字符串。
   alert(r);  		//	10

   var str = 'abcde';
   var r = str.search(/e/i);
   alert(r);		//	4
</script>	
</body>
</html>